import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'umeng_link_flutter_method_channel.dart';

abstract class UmengLinkFlutterPlatform extends PlatformInterface {
  /// Constructs a UmengLinkFlutterPlatform.
  UmengLinkFlutterPlatform() : super(token: _token);

  static final Object _token = Object();

  static UmengLinkFlutterPlatform _instance = MethodChannelUmengLinkFlutter();

  /// The default instance of [UmengLinkFlutterPlatform] to use.
  ///
  /// Defaults to [MethodChannelUmengLinkFlutter].
  static UmengLinkFlutterPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [UmengLinkFlutterPlatform] when
  /// they register themselves.
  static set instance(UmengLinkFlutterPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  void setOnLinkMessage(Function callback);

  Future<void> init() async {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
}
